import com.sun.source.tree.Tree;

import java.io.*;
import java.util.*;

public class test6 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("Java_11_16\\csb.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("Java_11_16\\test6.txt"));
        ArrayList<String> list = new ArrayList<>();
        String line;
        while ((line = br.readLine()) != null) {
            list.add(line);
        }
        Collections.sort(list, (s1,s2) ->
            Integer.parseInt(s1.split("\\.")[0]) - Integer.parseInt(s2.split("\\.")[0])
        );
        for (String str : list) {
            bw.write(str.substring(str.indexOf(".") + 1));
            bw.newLine();
        }
        bw.close();
        br.close();
    }
}
